package com.blb.community_admin.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community_admin.entity.ZyCommunity;
import com.blb.community_admin.mapper.CommunityMapper;
import com.blb.community_admin.service.IZyCommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ZyCommunityServiceImpl extends ServiceImpl<CommunityMapper, ZyCommunity> implements IZyCommunityService {


    @Autowired
    private CommunityMapper communityMapper;

    /**
     * 单表模糊查询分页
     * @param current
     * @param size
     * @param zyCommunity
     * @return
     */
    @Override
    public IPage<ZyCommunity> selectCommunitys(Long current, Long size, ZyCommunity zyCommunity) {
        return communityMapper.selectCommunitys(new Page<ZyCommunity>(current,size),zyCommunity);
    }

    /**
     * 更换物业
     * @param zyCommunity
     * @return
     */
    @Override
    public void updateDept(ZyCommunity zyCommunity) {
         communityMapper.updateDept(zyCommunity);
    }


}
